package com.zhongwang.mms.module.jiaGongStorage.dao;

import com.zhongwang.mms.gen.entity.POrder;
import com.zhongwang.mms.gen.entity.POrderExample;
import com.zhongwang.mms.gen.entity.TWarehouseInfo;
import com.zhongwang.mms.module.jiaGongStorage.model.JStorage;
import com.zhongwang.mms.module.jiaGongStorage.model.JStorageDetail;
import com.zhongwang.mms.module.jiaGongStorage.model.JStorageInventory;
import com.zhongwang.mms.module.purchase.model.POrderModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StorageInDao {
    long countByExample(POrderExample example);

    int deleteByExample(POrderExample example);

    int deleteByPrimaryKey(Integer odrId);

    int insert(JStorage jStorage);

    int insertSelective(POrder record);

    List<POrder> selectByExample(POrderExample example);

    POrder selectByPrimaryKey(Integer odrId);

    int updateByExampleSelective(@Param("record") POrder record, @Param("example") POrderExample example);

    int updateByExample(@Param("record") POrder record, @Param("example") POrderExample example);

    int updateByPrimaryKeySelective(POrder record);

    /**
     * 甲供件 入库明细写入
     * @param jStorageDetail
     * @return
     */
    int insertTStorageDetail(JStorageDetail jStorageDetail);

    List<TWarehouseInfo> findWarehouseInfoList();

    Integer findPJGJrderCodeCount();

    String findLastJGJOrderCode();

    int insertJStorageInventory(JStorageInventory jStorageInventory);
}